<div id="central" class="warp"> {include file="index/menu"}
  <div id="main" class="friends">
    <div id="header">
      <div class="title">
        <h1>站内短信</h1>
      </div>
      <div class="return"><a href="{$url(index/index)}">中心首页</a></div>
      <div class="fn-clear"></div>
    </div>
    <div id="tab" class="tabs">
      <ul>
        <li><a class="selected"  href="{$url(message/add)}">发送信息</a></li>
        <li><a href="{$url(message/index)}">返回收件箱</a></li>
      </ul>
      <div class="menu"> </div>
      <div class="fn-clear"></div>
    </div>
    <div class="form">
      <form action="{$url(message/add_save)}" method="post" id="form">
        <ul>
          <li>
            <label>联系人：</label>
            <input name="username" type="text" class="text" id="username" value="{$_GET['user']}" datatype="s4-20" errormsg="请输入正确的收件人" >
            <span class="Validform_checktip">收件人用户名，推荐从<a href="{$url(friends/index)}">联系人</a>中直接选择</span></li>
          <li>
            <label>标题：</label>
            <input name="title" type="text" class="text"  style="width:400px;" id="title" datatype="s3-200" errormsg="支持3~200个字符不支持特殊符号" >
            <span class="Validform_checktip"></span>
          </li>
          <li>
            <label>内容：</label>
            <textarea name="content" class="textarea" style="width:400px;" id="content" datatype="*" errormsg="请填写短消息内容" ></textarea>
          </li>
          <li>
            <label></label>
            <button class="button" type="submit">提交</button><span id="tip" class="load"></span>
          </li>
        </ul>
      </form>
    </div>
    <div class="fn-clear"></div>
  </div>
  <div class="fn-clear"></div>
</div>
<script>
Do.ready('userbase','form','dialog', function() {
	saveform(function(){
		$('#tip').text('短信发送成功！马上将为您转入发件箱');
		window.setTimeout(function(){ 
			window.location.href="<?php echo url('message/index',array('type'=>2)) ?>";
		},3000);
	});
});
</script> 